Skip to content

Update example to use context manager#2134

Closed
ranmocy wants to merge 1 commit intomicrosoft:mainfrom
ranmocy:main
Closed

Update example to use context manager#2134
ranmocy wants to merge 1 commit intomicrosoft:mainfrom
ranmocy:main

Conversation

@ranmocy
Copy link
Copy Markdown

@ranmocy ranmocy commented Oct 24, 2023

@ranmocy
Copy link
Copy Markdown
Author

ranmocy commented Oct 24, 2023

@microsoft-github-policy-service agree

@mxschmitt
Copy link
Copy Markdown
Contributor

Thank you for your contribution. We learned over the past few years while context managers are great to use, that the community often miss-understands them, so we prefer keeping it as it is.

@mxschmitt mxschmitt closed this Oct 30, 2023
@ranmocy
Copy link
Copy Markdown
Author

ranmocy commented Oct 30, 2023

@mxschmitt Thanks for replying. Is there any related thread or docs talking about the common mistakes? I'm very curious to learn about them.

@mxschmitt
Copy link
Copy Markdown
Contributor

e.g. think about that you use a context manager to get a page, you use it after the expect and wonder, why is it closed? We saw this is a popular pattern which confused users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants